import React, { Component } from 'react'
import Link from 'umi/link';
export default class componentName extends Component {
   state = {users:[]}
  componentWillMount(){
    let usersStr = localStorage.getItem('users');
    let users = usersStr?JSON.parse(usersStr):[];
    this.setState({users});
  }
  render() {
    return (
      <ul className="list-group">
      {
          this.state.users.map(item=>(
            <li className="list-group-item"><Link to={`/user/detail/${item.id}`}>{item.username}</Link></li>
          ))
      }
      </ul>
    )
  }
}